{% extends "base.html" %}
{%  block title %}图书列表页{% endblock %}
{% block content %}
<div class="container">
    <table class="table table-striped">
        <thead>
        <tr>
            <th scope="col">id</th>
            <th scope="col">书名</th>
            <th scope="col">作者</th>
            <th scope="col">在管数量</th>
            <th scope="col">描述</th>
        </tr>
        </thead>
        <tbody>
        {% for book in books %}
        <tr>
            <th scope="row">{{ book.id }}</th>
            <td><a href="{% url 'bookcms:detail' book.id %}"> {{ book.name }}</a></td>
            <td>{{ book.author }}</td>
            <td>{{ book.nums }}</td>
            <td>{{book.description}}</td>
        </tr>
        {% endfor %}
        </tbody>
    </table>
</div>
{% endblock content %}